a=[1, 2, 3, 4, 78]
b=[bin(x)[2:] for x in a]
ans=[]
for i in range(len(a)):
    n=sum([int(x) for x in list(b[i])])
    num=a[i]+1
    while True:
        if(sum([int(x) for x in list(bin(num)[2:])]) == n):
            ans.append(num)
            break
        num+=1
print(ans)